﻿<?xml version="1.0" encoding="utf-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ui="http://codestreamtech.com/Testing/WebAutomation/UIDefinition/2011/08" targetNamespace="http://codestreamtech.com/Testing/WebAutomation/UIDefinition/2011/08" elementFormDefault="qualified">
  <xs:simpleType name="identifier">
    <xs:restriction base="xs:string">
      <xs:pattern value="[_A-Za-z][_A-Za-z0-9 ]*" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="nonEmptyString">
    <xs:restriction base="xs:string">
      <xs:minLength value="1" />
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="control">    
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element name="Control" type="ui:control" />
    </xs:choice>
    <xs:attribute name="name" use="required" type="ui:identifier" />
    <xs:attribute name="tag" use="required" type="ui:nonEmptyString" />
    <xs:attribute name="id" use="optional" type="ui:nonEmptyString" />
    <xs:attribute name="class" use="optional" type="ui:nonEmptyString" />
    <xs:attribute name="multiple" use="optional" type="xs:boolean" />
  </xs:complexType>
  <xs:element name="Page">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="Control" type="ui:control" />
      </xs:choice>
      <xs:attribute name="name" use="required" type="ui:identifier" />
    </xs:complexType>
  </xs:element>
</xs:schema>